.class public abstract Lnbisdk/dz;
.super Ljava/lang/Object;


# instance fields
.field protected cW:Lnbisdk/rj;

.field private d:Lnbisdk/ov;

.field protected gu:I

.field private gv:J

.field private gw:B

.field private gx:Ljava/util/Vector;

.field private gy:Lnbisdk/ms;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public constructor <init>(Lnbisdk/rj;)V
    .locals 2

    invoke-direct {p0}, Lnbisdk/dz;-><init>()V

    const/4 v0, -0x1

    iput v0, p0, Lnbisdk/dz;->gu:I

    const-wide/high16 v0, 0x1000

    invoke-static {v0, v1}, Lnbisdk/pn;->k(J)Lnbisdk/ov;

    move-result-object v0

    iput-object v0, p0, Lnbisdk/dz;->d:Lnbisdk/ov;

    iput-object p1, p0, Lnbisdk/dz;->cW:Lnbisdk/rj;

    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/dz;->gy:Lnbisdk/ms;

    invoke-interface {p1}, Lnbisdk/rj;->dh()Lnbisdk/le;

    move-result-object v0

    invoke-virtual {v0}, Lnbisdk/le;->hV()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lnbisdk/dz;->dR()V

    :cond_0
    return-void
.end method


# virtual methods
.method protected a(B)V
    .locals 0

    iput p1, p0, Lnbisdk/dz;->gu:I

    return-void
.end method

.method public a(F)V
    .locals 0

    return-void
.end method

.method public a(Lnbisdk/dy;)V
    .locals 1

    invoke-virtual {p1}, Lnbisdk/dy;->dF()F

    move-result v0

    invoke-virtual {p0, v0}, Lnbisdk/dz;->a(F)V

    return-void
.end method

.method protected a(Lnbisdk/ms;)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lnbisdk/rp;
        }
    .end annotation

    iput-object p1, p0, Lnbisdk/dz;->gy:Lnbisdk/ms;

    invoke-virtual {p0}, Lnbisdk/dz;->getTarget()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0}, Lnbisdk/dz;->dP()[B

    move-result-object v1

    invoke-interface {p1, v0, v1}, Lnbisdk/ms;->a(Ljava/lang/String;[B)I

    move-result v0

    sget-boolean v1, Lnbisdk/bk;->cG:Z

    if-eqz v1, :cond_0

    invoke-virtual {p0}, Lnbisdk/dz;->getTarget()Ljava/lang/String;

    move-result-object v1

    iget v2, p0, Lnbisdk/dz;->gu:I

    const/4 v3, 0x0

    invoke-static {v1, v2, v0, v3}, Lnbisdk/ef;->b(Ljava/lang/String;III)V

    :cond_0
    return-void
.end method

.method protected b(Lcom/navbuilder/nb/NBException;)V
    .locals 3

    sget-boolean v0, Lnbisdk/bk;->DEBUG:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/dz;->d:Lnbisdk/ov;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ".onConnectionError"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lnbisdk/ov;->info(Ljava/lang/String;)V

    :cond_0
    return-void
.end method

.method public b(Lnbisdk/dy;)V
    .locals 0

    invoke-virtual {p0, p1}, Lnbisdk/dz;->c(Lnbisdk/dy;)V

    return-void
.end method

.method protected b(B)Z
    .locals 2

    iget v0, p0, Lnbisdk/dz;->gu:I

    const/4 v1, -0x1

    if-eq v0, v1, :cond_0

    iget v0, p0, Lnbisdk/dz;->gu:I

    int-to-byte v0, v0

    if-ne v0, p1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method protected c(Lcom/navbuilder/nb/NBException;)V
    .locals 4

    sget-boolean v0, Lnbisdk/bk;->DEBUG:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/dz;->d:Lnbisdk/ov;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ".onInternalError"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lnbisdk/ov;->info(Ljava/lang/String;)V

    sget-boolean v0, Lnbisdk/bk;->DEBUG:Z

    if-eqz v0, :cond_0

    invoke-virtual {p1}, Lcom/navbuilder/nb/NBException;->getMessage()Ljava/lang/String;

    move-result-object v0

    const-wide/high16 v1, 0x1000

    const/4 v3, 0x1

    invoke-static {v0, v1, v2, v3}, Lnbisdk/pn;->a(Ljava/lang/String;JB)V

    :cond_0
    return-void
.end method

.method public c(Ljava/util/Vector;)V
    .locals 0

    iput-object p1, p0, Lnbisdk/dz;->gx:Ljava/util/Vector;

    return-void
.end method

.method public c(Lnbisdk/dy;)V
    .locals 4

    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/dz;->gy:Lnbisdk/ms;

    :try_start_0
    invoke-virtual {p1}, Lnbisdk/dy;->isError()Z

    move-result v0

    if-nez v0, :cond_1

    invoke-virtual {p1}, Lnbisdk/dy;->dA()Lnbisdk/fk;

    move-result-object v0

    invoke-virtual {p0, v0}, Lnbisdk/dz;->h(Lnbisdk/fk;)V

    sget-boolean v1, Lnbisdk/bk;->cF:Z

    if-eqz v1, :cond_0

    invoke-virtual {v0}, Lnbisdk/fk;->ac()V

    invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Runtime;->freeMemory()J

    move-result-wide v0

    const-wide/32 v2, 0x7d000

    cmp-long v0, v0, v2

    if-gez v0, :cond_0

    invoke-static {}, Ljava/lang/System;->gc()V

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-virtual {p1}, Lnbisdk/dy;->dw()Z

    move-result v0

    if-eqz v0, :cond_2

    invoke-virtual {p0}, Lnbisdk/dz;->dO()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    sget-boolean v1, Lnbisdk/bk;->DEBUG:Z

    if-eqz v1, :cond_0

    const-wide/high16 v1, 0x1000

    const/4 v3, 0x1

    invoke-static {v0, v1, v2, v3}, Lnbisdk/pn;->a(Ljava/lang/Throwable;JB)V

    goto :goto_0

    :cond_2
    :try_start_1
    invoke-virtual {p1}, Lnbisdk/dy;->dx()Z

    move-result v0

    if-eqz v0, :cond_3

    invoke-virtual {p1}, Lnbisdk/dy;->dB()Lcom/navbuilder/nb/NBException;

    move-result-object v0

    invoke-virtual {p0, v0}, Lnbisdk/dz;->c(Lcom/navbuilder/nb/NBException;)V

    goto :goto_0

    :cond_3
    invoke-virtual {p1}, Lnbisdk/dy;->dy()Z

    move-result v0

    if-eqz v0, :cond_4

    invoke-virtual {p1}, Lnbisdk/dy;->dC()Lcom/navbuilder/nb/NBException;

    move-result-object v0

    invoke-virtual {p0, v0}, Lnbisdk/dz;->e(Lcom/navbuilder/nb/NBException;)V

    goto :goto_0

    :cond_4
    invoke-virtual {p1}, Lnbisdk/dy;->dz()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p1}, Lnbisdk/dy;->dD()Lcom/navbuilder/nb/NBException;

    move-result-object v0

    invoke-virtual {p0, v0}, Lnbisdk/dz;->d(Lcom/navbuilder/nb/NBException;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0
.end method

.method protected d(Lcom/navbuilder/nb/NBException;)V
    .locals 3

    sget-boolean v0, Lnbisdk/bk;->DEBUG:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/dz;->d:Lnbisdk/ov;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ".onServerError"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lnbisdk/ov;->info(Ljava/lang/String;)V

    :cond_0
    return-void
.end method

.method public dI()Ljava/util/Vector;
    .locals 1

    iget-object v0, p0, Lnbisdk/dz;->gx:Ljava/util/Vector;

    return-object v0
.end method

.method protected abstract dJ()Lnbisdk/ri;
.end method

.method protected dK()B
    .locals 2

    iget v0, p0, Lnbisdk/dz;->gu:I

    const/4 v1, -0x1

    if-ne v0, v1, :cond_0

    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "ID required before being set"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    iget v0, p0, Lnbisdk/dz;->gu:I

    int-to-byte v0, v0

    return v0
.end method

.method protected dL()Z
    .locals 4

    iget-wide v0, p0, Lnbisdk/dz;->gv:J

    const-wide/16 v2, 0x0

    cmp-long v0, v0, v2

    if-lez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method protected dM()V
    .locals 2

    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lnbisdk/dz;->gv:J

    return-void
.end method

.method protected dN()V
    .locals 2

    invoke-virtual {p0}, Lnbisdk/dz;->dL()Z

    move-result v0

    if-eqz v0, :cond_0

    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "request already pending"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iput-wide v0, p0, Lnbisdk/dz;->gv:J

    return-void
.end method

.method protected dO()V
    .locals 3

    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/dz;->gy:Lnbisdk/ms;

    sget-boolean v0, Lnbisdk/bk;->DEBUG:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/dz;->d:Lnbisdk/ov;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ".onTimedout"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lnbisdk/ov;->info(Ljava/lang/String;)V

    :cond_0
    return-void
.end method

.method protected dP()[B
    .locals 4

    sget-boolean v0, Lnbisdk/bk;->cF:Z

    if-eqz v0, :cond_0

    invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Runtime;->freeMemory()J

    move-result-wide v0

    const-wide/32 v2, 0x7d000

    cmp-long v0, v0, v2

    if-gez v0, :cond_0

    invoke-static {}, Ljava/lang/System;->gc()V

    :cond_0
    new-instance v0, Lnbisdk/ru;

    iget-object v1, p0, Lnbisdk/dz;->cW:Lnbisdk/rj;

    invoke-interface {v1}, Lnbisdk/rj;->kP()Lnbisdk/jz;

    move-result-object v1

    invoke-direct {v0, v1}, Lnbisdk/ru;-><init>(Lnbisdk/jz;)V

    :try_start_0
    new-instance v1, Lnbisdk/ri;

    const-string v2, "query"

    invoke-direct {v1, v2}, Lnbisdk/ri;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0}, Lnbisdk/dz;->dJ()Lnbisdk/ri;

    move-result-object v2

    invoke-virtual {v1, v2}, Lnbisdk/ri;->d(Lnbisdk/ri;)V

    sget-boolean v2, Lnbisdk/bk;->DEBUG:Z

    if-eqz v2, :cond_1

    iget-object v2, p0, Lnbisdk/dz;->d:Lnbisdk/ov;

    invoke-virtual {v1}, Lnbisdk/ri;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Lnbisdk/ov;->info(Ljava/lang/String;)V

    :cond_1
    invoke-virtual {v0, v1}, Lnbisdk/ru;->v(Lnbisdk/fk;)V

    invoke-virtual {v0}, Lnbisdk/ru;->kU()I

    move-result v1

    add-int/lit8 v1, v1, 0x2

    new-array v1, v1, [B

    const/4 v2, 0x0

    invoke-virtual {p0}, Lnbisdk/dz;->dQ()B

    move-result v3

    aput-byte v3, v1, v2

    const/4 v2, 0x1

    invoke-virtual {p0}, Lnbisdk/dz;->dK()B

    move-result v3

    aput-byte v3, v1, v2

    const/4 v2, 0x2

    invoke-virtual {v0, v1, v2}, Lnbisdk/ru;->e([BI)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    invoke-virtual {v0}, Lnbisdk/ru;->close()V

    return-object v1

    :catchall_0
    move-exception v1

    invoke-virtual {v0}, Lnbisdk/ru;->close()V

    throw v1
.end method

.method protected dQ()B
    .locals 1

    iget-byte v0, p0, Lnbisdk/dz;->gw:B

    return v0
.end method

.method public dR()V
    .locals 1

    iget-byte v0, p0, Lnbisdk/dz;->gw:B

    or-int/lit8 v0, v0, 0x1

    int-to-byte v0, v0

    iput-byte v0, p0, Lnbisdk/dz;->gw:B

    return-void
.end method

.method protected e(Lcom/navbuilder/nb/NBException;)V
    .locals 3

    sget-boolean v0, Lnbisdk/bk;->DEBUG:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/dz;->d:Lnbisdk/ov;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ".onStreamError"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lnbisdk/ov;->info(Ljava/lang/String;)V

    :cond_0
    return-void
.end method

.method protected e(J)Z
    .locals 8

    const-wide/32 v6, 0xea60

    const/4 v5, 0x1

    const/4 v4, 0x0

    invoke-virtual {p0}, Lnbisdk/dz;->dL()Z

    move-result v0

    if-nez v0, :cond_0

    move v0, v4

    :goto_0
    return v0

    :cond_0
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    const-wide/16 v2, 0x0

    cmp-long v2, p1, v2

    if-lez v2, :cond_2

    sub-long/2addr v0, p1

    cmp-long v0, v0, v6

    if-lez v0, :cond_1

    move v0, v5

    goto :goto_0

    :cond_1
    move v0, v4

    goto :goto_0

    :cond_2
    iget-wide v2, p0, Lnbisdk/dz;->gv:J

    sub-long/2addr v0, v2

    cmp-long v0, v0, v6

    if-lez v0, :cond_3

    move v0, v5

    goto :goto_0

    :cond_3
    move v0, v4

    goto :goto_0
.end method

.method protected abstract getTarget()Ljava/lang/String;
.end method

.method protected h(Lnbisdk/fk;)V
    .locals 3

    sget-boolean v0, Lnbisdk/bk;->DEBUG:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/dz;->d:Lnbisdk/ov;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ".onReply"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lnbisdk/ov;->info(Ljava/lang/String;)V

    iget-object v0, p0, Lnbisdk/dz;->d:Lnbisdk/ov;

    invoke-virtual {p1}, Lnbisdk/fk;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lnbisdk/ov;->info(Ljava/lang/String;)V

    :cond_0
    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lnbisdk/dz;->gv:J

    return-void
.end method

.method protected onCancel()V
    .locals 3

    iget-object v0, p0, Lnbisdk/dz;->gy:Lnbisdk/ms;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/dz;->gy:Lnbisdk/ms;

    invoke-interface {v0}, Lnbisdk/ms;->cancel()V

    :cond_0
    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/dz;->gy:Lnbisdk/ms;

    sget-boolean v0, Lnbisdk/bk;->DEBUG:Z

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/dz;->d:Lnbisdk/ov;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ".onCancel"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lnbisdk/ov;->info(Ljava/lang/String;)V

    :cond_1
    return-void
.end method
